package server.conf;

import java.util.ArrayList;
import java.util.List;

/**
 * @author bwcx_jzy
 * @since 2021/11/19
 */
public class Host {

    private String name;

    private String appBase;

    private String hostUrl;

    private List<Context> contexts;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAppBase() {
        return appBase;
    }

    public void setAppBase(String appBase) {
        this.appBase = appBase;
    }

    public String getHostUrl() {
        return hostUrl;
    }

    public void setHostUrl(String hostUrl) {
        this.hostUrl = hostUrl;
    }

    public List<Context> getContexts() {
        return contexts;
    }

    public void addContext(Context context) {
        if (contexts == null) {
            contexts = new ArrayList<>();
        }
        contexts.add(context);
    }
}
